using Services;
using UnityEngine;

public class Slider_Volume : MySlider
{
    [SerializeField]
    private string mixer;
    private AudioPlayerBase audioPlayer;

    protected override void Awake()
    {
        audioPlayer = ServiceLocator.Get<AudioPlayerBase>();
        base.Awake();
    }

    protected override void OnSlide(float value)
    {
        audioPlayer.SetVolume(mixer, value);
    }
}
